import { SlaveAbility } from "../全局对象/slaveManage"

export const SlaveSkillList = ['诱惑之光', '召唤骷髅', '召唤神兽']

export const KulouSet = {
    //名称
    name: '变异骷髅',
    //所属技能
    skillName: "召唤骷髅",
    //不同技能等级下的属性
    slaveBaseAbility: {
        //hp
        MaxHp: 700,
        //攻击
        DCMin: 10,
        DCMax: 30,
        //防御
        ACMin: 10,
        ACMax: 15,
        //魔域
        MACMin: 10,
        MACMax: 15,
    }
}
export const DogSet = {
    //名称
    name: '白虎',
    //所属技能
    skillName: "召唤神兽",
    //不同技能等级下的属性
    slaveBaseAbility: {
        //hp
        MaxHp: 2000,
        //攻击
        DCMin: 20,
        DCMax: 40,
        //防御
        ACMin: 15,
        ACMax: 20,
        //魔域
        MACMin: 15,
        MACMax: 20,
    }
}


//法师诱惑之光的宠物列表
export const AllSlaveSet = [

    {
        name: "虎卫",
        //等级
        level: 15,

        skillLevel: 0,
        //所属技能
        skillName: "诱惑之光",
        //不同技能等级下的属性
        slaveBaseAbility: {
            //hp
            MaxHp: 500,
            //攻击
            DCMin: 5,
            DCMax: 25,
            //防御
            ACMin: 10,
            ACMax: 10,
            //魔域
            MACMin: 10,
            MACMax: 10,
        }
    },
    {
        name: "半兽勇士1",
        skillLevel: 1,
        //所属技能
        skillName: "诱惑之光",
        //不同技能等级下的属性
        slaveBaseAbility: {
            //hp
            MaxHp: 700,
            //攻击
            DCMin: 10,
            DCMax: 30,
            //防御
            ACMin: 10,
            ACMax: 15,
            //魔域
            MACMin: 10,
            MACMax: 15,
        }
    },
    KulouSet,
    DogSet,
]

//技能所属宝宝的数量
export const SkillSlaveNumSet = {
    召唤神兽: [
        1,
        1,
        1,
        1,
        1,
        1,
        2,
        2,
        2,
        2,
        3,
    ]
}

export function getSlaveAddAbiBySkill(magic: TUserMagic): SlaveAbility {
    let abi: SlaveAbility = {
        //hp
        MaxHp: 0,
        //攻击
        DCMin: 0,
        DCMax: 0,
        //防御
        ACMin: 0,
        ACMax: 0,
        //魔域
        MACMin: 0,
        MACMax: 0,
    } as SlaveAbility
    let lv = magic.Level;
    let strLv = magic.Strengthen;
    if (magic) {

        abi.MaxHp = lv * 100 + strLv * 200;
        abi.DCMin = lv * 1 + strLv * 2;
        abi.DCMax = lv * 2 + strLv * 3;
        abi.ACMin = lv * 1 + strLv * 1;
        abi.ACMax = lv * 2 + strLv * 2;
        abi.MACMin = lv * 1 + strLv * 1;
        abi.MACMax = lv * 2 + strLv * 2;
    }
    return abi;
}